# CMake package configuration file for the SofaCUDA plugin

@PACKAGE_GUARD@
@PACKAGE_INIT@

list(FIND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" HAS_SOFACUDA_CMAKE_MODULE_PATH)
if(HAS_SOFACUDA_CMAKE_MODULE_PATH EQUAL -1)
    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
endif()

set(CMAKE_CUDA_ARCHITECTURES @CMAKE_CUDA_ARCHITECTURES@)

find_package(Sofa.Component.Mass QUIET REQUIRED)
find_package(Sofa.Component.SolidMechanics.FEM.Elastic QUIET REQUIRED)
find_package(Sofa.Component.SolidMechanics.FEM.HyperElastic QUIET REQUIRED)
find_package(Sofa.Component.SolidMechanics.TensorMass QUIET REQUIRED)
find_package(Sofa.Component.Collision.Response.Contact QUIET REQUIRED)
find_package(Sofa.Component.Collision.Detection.Intersection QUIET REQUIRED)
find_package(Sofa.Component.StateContainer QUIET REQUIRED)
find_package(Sofa.Component.Constraint.Projective QUIET REQUIRED)
find_package(Sofa.Component.Mapping.Linear QUIET REQUIRED)
find_package(Sofa.Component.Mapping.NonLinear QUIET REQUIRED)
find_package(Sofa.Component.Engine.Select QUIET REQUIRED)
find_package(Sofa.Component.Engine.Transform QUIET REQUIRED)
find_package(Sofa.Component.MechanicalLoad QUIET REQUIRED)


set(SOFACUDA_HAVE_SOFA_GL @SOFACUDA_HAVE_SOFA_GL@)
if(SOFACUDA_HAVE_SOFA_GL)
	find_package(Sofa.GL QUIET REQUIRED)
endif()

set(SOFACUDA_HAVE_SOFA_GUI_QT @SOFACUDA_HAVE_SOFA_GUI_QT@)
if(SOFACUDA_HAVE_SOFA_GUI_QT)
	find_package(Sofa.Qt QUIET REQUIRED)
endif()

set(SOFACUDA_HAVE_SOFADISTANCEGRID @SOFACUDA_HAVE_SOFADISTANCEGRID@)
set(SOFACUDA_HAVE_MINIFLOWVR @SOFACUDA_HAVE_MINIFLOWVR@)
if(SOFACUDA_HAVE_SOFADISTANCEGRID)
	find_package(SofaDistanceGrid QUIET REQUIRED)
	if(SOFACUDA_HAVE_MINIFLOWVR)
		find_package(miniFlowVR QUIET REQUIRED)
	endif()
endif()

set(SOFACUDA_HAVE_SOFAVALIDATION @SOFACUDA_HAVE_SOFAVALIDATION@)
if(SOFACUDA_HAVE_SOFAVALIDATION)
	find_package(SofaValidation QUIET REQUIRED)
endif()

if(NOT TARGET SofaCUDA)
	include("${CMAKE_CURRENT_LIST_DIR}/SofaCUDATargets.cmake")
endif()

check_required_components(SofaCUDA)
